import { useCallback } from "react";
import recordEvent from "@/services/recordEvent";
import { Query } from "@/services/query";

export default function useRemoveQuery(query) {
  return useCallback(() => {
    recordEvent("toggle_remove", "query", query.id);
    Query.remove(query);
  }, [query]);
}
